import { Helper } from "../core/helper";

export class MD4 {
    public static F(x: number, y: number, z: number): number {
        return ((x & y) | ((~x) & z)) >>> 0;
    }
    public static G(x: number, y: number, z: number): number {
        return ((x & y) | (x & z) | (y & z));
    }
    public static H(x: number, y: number, z: number): number {
        return (x ^ y ^ z);
    }
    public static ROTL(x: number, shift: number): number {
        x = x >>> 0;
        return Helper.uint((x << shift) | (x >>> (32 - shift)));
    }
}